<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<form action="b.php" method="post" enctype="multipart/form-data">
    <input type="submit"/>
    <input type="file" name="file1"/>

</form>

<?php
/**
 * Created by PhpStorm.
 * User: dapeng
 * Date: 2019-12-04
 * Time: 14:12
 */


$myfile = fopen("d.txt","a+");
//filesize()
//var_dump($myfile);

fwrite($myfile,"abc");



$myfile = fopen("d.txt","r");
$s = "";
while(!feof($myfile)){
    $s .= fread($myfile,10);
}
var_dump($s);

fclose($myfile);
